home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Games Machine 76
/
XENIATGM66.iso
/
Indiana Jones
/
Indiana Jones.exe
/
RESOURCE
/
PREVIEW.GOB
/
cog_bab_introscene.cog
< prev
next >
Wrap
Text File
|
1999-11-15
|
7KB
|
225 lines
# Jones 3D Cog Script
#
# BAB_introsceme.cog
#
# [SXC & revised by HB]
#
# (C) 1999 LucasArts Entertainment Co. All Rights Reserved
# ==============================================================================
symbols
message startup
message user0
thing player local
thing indyactor
thing actor_sight0 nolink
thing actor_sight1 nolink
thing intro_in_mk_1
thing intro_in_mk_2
thing intro_in_mk_3
thing cam0 nolink
thing cam1 nolink
thing cam2 nolink
thing cam0_tgt0 nolink
thing cam1_tgt0 nolink
thing cam2_tgt0 nolink
thing fadeplane nolink
keyframe in_falling=in_jump_fall.key local //159x
keyframe in_landhard=in_jump_land_hard.key local //57x
keyframe in_handsONhips=0in_stand4.key local
keyframe in_sideTOhips=0in_stand1_bd_4.key local
keyframe in_hipsTOside=0in_stand4_bd_1.key local
keyframe in_ltarmup=0in_leftarm_1_1.key local
keyframe in_thinking=0in_thinking_4_4.key local //150x
material topMat=pyr_jeep_top.mat local
material botMat=pyr_jeep_bbmp.mat local
sound indyline0=inxj006.wav local //0.8 sec
sound indyline1=bb01j01.wav local //6.8 sec
sound jeep_run=jep_reverse_loop.wav local
sound jeep_stop=jep_engine_off.wav local
sound theme=mus_bab_intro.WAV local
sound indy_bodyfall=fol_in_landearth.wav local
flex in_headRate local
flex in_rotRate local
int checkit=0 local
int themechan=0 local
int jeepchan=0 local
int cursound local
int in_track0 local
int in_track1 local
int bSeen=0 local
end
# ==============================================================================
code
startup:
SetMasterCog(GetSelfCog()); # RT: Set master cog so we get autosave/restore message
Sleep(0.001); # Let engine get set up
SetThingAlpha(fadeplane, 1.0); #make sure it's opaque
# Start on black ...
SetCameraLookInterp(2, 0); #no pan, no tilt
SetCameraPosInterp(2, 0); #no dolly
SetCameraFocus(2, cam0);
SetCameraSecondaryFocus(2, indyactor);
SetCurrentCamera(2);
SetCameraFOV(55, 0, 0.0);
return;
# ..............................................................................
user0: # RT: Indicates that autosave/restore has completed...
if (bSeen) return; # RT
bSeen = 1;
# fadein ...
SetCameraLookInterp(2, 0); //no pan, no tilt
SetCameraPosInterp(2, 0); //no dolly
SetCameraFocus(2, cam0);
SetCameraSecondaryFocus(2, indyactor);
SetCurrentCamera(2);
SetCameraFOV(55, 0, 0.0);
ThingFadeAnim(fadeplane, 1.0, 0.0, 1.0, 0);
# RT: Set up jeep materials
SetMaterialCel(topMat, 1);
SetMaterialCel(botMat, 1);
player = GetLocalPlayerThing();
SetThingAlpha(player, 1.0);
StartCutscene(1);
SetActorFlags(player, 0x200000);
//fadein ...
SetCameraLookInterp(2, 0); //no pan, no tilt
SetCameraPosInterp(2, 0); //no dolly
SetCameraFocus(2, cam0);
SetCameraSecondaryFocus(2, indyactor);
SetCurrentCamera(2);
SetCameraFOV(55, 0, 0.0);
ThingFadeAnim(fadeplane, 1.0, 0.0, 1.0, 0);
//StopSound(0, 0.0); //TEMP FOR TESTING!
//StopSound(1, 0.0); //TEMP FOR TESTING!
themechan=PlaySoundLocal(theme, 1, 0, 0x0, 0);
//Start the scene...
CopyPlayerHolsters(player, indyactor);
SetThingFlags(player, 0x80000);
ClearThingFlags(indyactor, 0x80000);
//Prep actor and move him to 1st mark...
AISetCutsceneMode(indyactor);
AISetMoveSpeed(indyactor, 1.0);
in_headRate = GetThingMaxHeadVel(player);
SetThingMaxHeadVel(indyactor, 200.0);
in_rotRate = GetThingMaxRotVel(player);
SetThingMaxRotVel(indyactor, 200.0);
AISetMoveThing(indyactor, intro_in_mk_1, 0);
Sleep(0.01);
SetCameraFOV(45, 1, 2.0);
Sleep(0.5);
AISetLookThing(indyactor, actor_sight1);
AIWaitForStop(indyactor);
DestroyThing(fadeplane);
//Indy drops down slope...
in_track0 = PlayKey(indyactor, in_falling, 6, 0x00, 0);
in_track1 = MoveThingToPos(indyactor, GetThingPos(intro_in_mk_2), 0.7);
ClearThingFlags(indyactor, 0x4000); //shadow off
WaitForAnimStop(in_track1);
SetThingFlags(indyactor, 0x4000); //shadow on
StopKey(indyactor, in_track0, 0.0);
PlayKey(indyactor, in_landhard, 4, 0x12, 0); //ouch
PlaySoundThing(indy_bodyfall, indyactor, 1, 10, 20, 0); # TOO HEAVY!
Sleep(0.7);
//Cut to shot of Indy at bottom while he stands...
SetCameraFocus(2, cam1);
SetCameraSecondaryFocus(2, cam1_tgt0);
SetCameraFOV(90, 0, 0.0);
Sleep(0.01);
SetCameraFOV(70, 1, 3.0);
Sleep(1.2); //until Indy is standing up again
AISetLookThing(indyactor, actor_sight1);
//Start Indy toward 3rd mark...
AISetMoveThing(indyactor, intro_in_mk_3, 0);
Sleep(1.8);
//Cut to reverse...
SetCameraFocus(2, cam2);
SetCameraSecondaryFocus(2, cam2_tgt0);
SetCameraFOV(70, 0, 0.0);
Sleep(0.01);
SetCameraFOV(90, 1, 0.5);
AIWaitForStop(indyactor);
//play keys and voice files
//StopSound(0, 0.0); //TEMP FOR TESTING!
//StopSound(1, 0.0); //TEMP FOR TESTING!
//Indy: "wheeeooo"
cursound = PlayVoice(indyactor, indyline0, 1, 1);
WaitForSound(cursound);
//Indy: "Babylon...mud brick...why Russians dig up?"
cursound = PlayVoice(indyactor, indyline1, 1, 0);
Sleep(0.5);
PlayKey(indyactor, in_ltarmup, 4, 0x12, 1);
in_track0 = PlayKey(indyactor, in_handsONhips, 2, 0x00, 0);
PlayKey(indyactor, in_sideTOhips, 4, 0x12, 1);
in_track1 = PlayKey(indyactor, in_thinking, 4, 0x12, 0);
Sleep(4.0);
StopKey(indyactor, in_track0, 0.5);
StopKey(indyactor, in_track1, 0.5);
Sleep(0.5);
WaitForSound(cursound);
//Restore Everything
CopyOrientAndPos(indyactor, player);
ResetCameraFOV(0, 0.0);
SetCameraLookInterp(2, 0);
SetCameraPosInterp(2, 0);
SetCameraInterpSpeed(2, 0);
Sleep(0.01);
SetCameraPosition(1, GetThingPos(cam2));
ClearThingFlags(player, 0x80000);
SetThingMaxHeadVel(indyactor, in_headRate);
SetThingMaxRotVel(indyactor, in_rotRate);
SetThingFlags(indyactor, 0x80000);
SetCurrentCamera(1);
//Give player gear...
SetInv(player, 82, 1);
SetInvAvailable(player, 82, 1);
EndCutscene();
ClearActorFlags(player, 0x200000);
return;
end